using GolSig.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;

using System.Linq;

namespace Test.GolSig.Library.GridSpecs
{
    [TestClass]
    public class WhenGettingAllCurrentCells
    {
        [TestMethod()]
        public void GivenEmptyBoardThreeByThree_GridHasNineCells()
        {
            Board board = new Board(new BoardSize(3, 3));
            Grid target = new Grid(board);


            IEnumerable<CellInfo> actual;
            actual = target.GetAllCurrentCellInfo();
            Assert.IsTrue(actual.Count() == 9);

        }
      
        [TestMethod()]
        public void GivenEmptyBoard_AllCellsAreDead()
        {
            Board board = new Board(new BoardSize(3, 3));
            Grid target = new Grid(board);
            
          
            IEnumerable<CellInfo> actual;
            actual = target.GetAllCurrentCellInfo();
            foreach (var item in actual)
            {
                Assert.IsTrue(item.Alive == false);
            }
           ;
           
        }

    }
}
